package org.come.summonequip;

import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

import javax.swing.BorderFactory;
import javax.swing.DefaultListModel;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextField;
import javax.swing.ScrollPaneConstants;
import javax.swing.SwingConstants;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;

import org.cbg.until.TraslationDemoScrollBarUI;
import org.come.Frame.TestpackJframe;
import org.come.Frame.ZhuFrame;
import org.come.entity.Goodstable;
import org.come.entity.RoleSummoning;
import org.come.until.CutButtonImage;
import org.come.until.GoodsListFromServerUntil;
import org.come.until.SrcollPanelUI;
import org.come.until.UserMessUntil;
import org.come.until.Util;

import com.tool.btn.FormsOnOffBtn;
import com.tool.role.RoleData;
import com.tool.tcpimg.UIUtils;
import com.updateNew.MyIsif;


/**
 * 召唤兽装备主面板
 * <p>
 * Title : JpanelSummonEquipMain
 * </p>
 *
 * @author : HGC
 * @version : 1.0.0
 * @date : 2019年7月19日 下午2:46:20
 */
public class JpanelSummonEquipMain extends JPanel {

    /**
     * 已穿装备面板
     */
    private JpanelNowEquip jpanelNowEquip;

    /**
     * 第一个单选按钮radioBtnOne<br>
     * 第二个单选按钮radioBtnTwo<br>
     * 第一个单选文本radioLabOne<br>
     * 第二个单选文本radioLabTwo<br>
     * 第一个背景框equipBackImgOne<br>
     * 第二个背景框equipBackImgTwo<br>
     * 第一个图片框equipImgOne<br>
     * 第二个图片框equipImgTwo<br>
     * 第一个文本textLabOne<br>
     * 第二个文本textLabTwo<br>
     * 当前拥有奖章数量nowNumLab<br>
     * 提升等级面板长条框upgradeLab<br>
     * 提升等级面板长条框里面的觉醒技awakenName<br>
     * 提升等级面板长条框里面的等级levelLab<br>
     * 提升等级面板长条框里面的经验expLab<br>
     * 提升等级面板长条框里面的经验条expLabImg<br>
     * 提升等级面板长条框里面的经验框expBackLabImg<br>
     */
    private JLabel radioBtnOne, radioBtnTwo, radioLabOne, radioLabTwo, equipBackImgOne, equipBackImgTwo, equipImgOne,
            equipImgTwo, textLabOne, textLabTwo, nowNumLab, upgradeLab, awakenName, levelLab, expLab, expLabImg,
            expBackLabImg;

    /**
     * 消耗奖章输入框
     */
    private JTextField numText;

    /**
     * 12个格子goodsLabs<br>
     * 5个格子重洗属性washGoodsLabs<br>
     */
    private JLabel[] goodsLabs, washGoodsLabs;

    /**
     * 11当前装备按钮nowEquipBtn<br>
     * 12确认按钮（根据面板变化图片）ackBtn<br>
     * 13兑换奖励按钮 cashRewardsBtn<br>
     * 1觉醒菜单按钮 cultivateMenuBtn<br>
     * 2重铸菜单按钮 recastMenuBtn<br>
     * 3觉醒菜单按钮 awakenMenuBtn<br>
     * 14觉醒菜单按钮 maxNumBtn<br>
     * 15帮助按钮 helpBtn<br>
     */
//    private BtnSummonEquipMain nowEquipBtn, ackBtn, cashRewardsBtn, cultivateMenuBtn, recastMenuBtn, awakenMenuBtn,
//            maxNumBtn, helpBtn;
    private BtnSummonEquipMain nowEquipBtn, ackBtn, cashRewardsBtn, cultivateMenuBtn, recastMenuBtn, awakenMenuBtn,
            maxNumBtn;

    /**
     * 召唤兽名字Jlist
     */
    private JList<String> summonNameJlist;
    /**
     * 召唤兽名字Model
     */
    private DefaultListModel<String> summonNamesModel;
    /**
     * 滚动条
     */
    private JScrollPane scrollPane;

    /**
     * 单选按钮标识 <br>
     * 1是第一个 单选按钮 <br>
     * 2是第二个单选按钮<br>
     */
    private int radioBtnType = 1;
    /**
     * 当前的菜单按钮标识<br>
     * 1是培养面板 <br>
     * 2是重铸面板 <br>
     * 3是觉醒面板 <br>
     */
    private int summonEquipMenuType = -1;

    /**
     * 选中的召唤兽装备
     */
    private BigDecimal chooseEquip;
    /**
     * 选中的召唤兽材料
     */
    private BigDecimal chooseGoods;
    /**
     * 选中的重洗技能材料
     */
    private Goodstable[] chooseWashGoods;
    /**
     * 消耗的大话币
     */
    private BigDecimal money = new BigDecimal(100000);

    /**
     * 当前选中的召唤兽sid
     */
    private ArrayList<BigDecimal> summonList;

    private BigDecimal scoretype;

    public JpanelSummonEquipMain() {
        String style = MyIsif.getStyle();
        if ("水墨UI".equals(style)) {
            setPreferredSize(new Dimension(382, 455));
            setOpaque(false);
            setLayout(null);

            // 关闭按钮事件
            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/old/2/1.png", 1, 91);
            offBtn.setBounds(382 - 37, 10, 25, 25);
            this.add(offBtn);
        } else {
            //
            setPreferredSize(new Dimension(356, 477));
            setOpaque(false);
            setLayout(null);

            // 关闭按钮事件
            FormsOnOffBtn offBtn = new FormsOnOffBtn("inkImg/hongmu/s74.png", 1, 91);
            offBtn.setBounds(331, 0, 25, 25);
            this.add(offBtn);
        }

        /** 添加组件 */
        getSummonList();
        getScrollPane();
        getJpanelNowEquip();
        getRadioBtnOne();
        getRadioBtnTwo();
        getRadioLabOne();
        getRadioLabTwo();
        getNowEquipBtn();
        getEquipImgOne();
        getEquipImgTwo();
        getEquipBackImgOne();
        getEquipBackImgTwo();
        getTextLabOne();
        getTextLabTwo();
        getGoodsLabs();
        getAckBtn();
        getCashRewardsBtn();
        getCultivateMenuBtn();
        getRecastMenuBtn();
        getAwakenMenuBtn();
        getMaxNumBtn();
        getAwakenName();
        getLevelLab();
        getExpLab();
        getExpLabImg();
        getExpBackLabImg();
        getUpgradeLab();
        getNowNumLab();
        getWashGoodsLabs();
//        getHelpBtn();
        getNumText();
        scoretype = RoleData.getRoleData().getLoginResult().getScoretype("比斗奖章");
    }

    /**
     * 切换菜单面板
     */
    public void changeMenuView(int type) {
        /** 初始化面板操作判断 */
        if (type == -1) {
            if (summonEquipMenuType == -1) {
                type = 1;
            } else {
                return;
            }
        }
        /** 切换面板 */
        refreshView(summonEquipMenuType, radioBtnType, false);
        summonEquipMenuType = type;
        changeViewChooseRadioBtn();
        refreshView(summonEquipMenuType, radioBtnType, true);
    }

    /**
     * 根据两个标识刷新面板
     */
    public void refreshView(int menuType, int btnType, boolean type) {
        if (menuType == 1 && btnType == 1) {
            changeCultivateViewCultivateBtn(type);
        } else if (menuType == 1 && btnType == 2) {
            changeCultivateViewResolveBtn(type);
        } else if (menuType == 2 && btnType == 1) {
            changeRecastViewAttributeBtn(type);
        } else if (menuType == 2 && btnType == 2) {
            changeRecastViewSkillBtn(type);
        } else if (menuType == 3 && btnType == 1) {
            changeAwakenViewUpgradeBtn(type);
        } else if (menuType == 3 && btnType == 2) {
            changeAwakenViewOpenawakenBtn(type);
        }
    }

    /**
     * 培养菜单面板的培养按钮界面单选按钮
     */
    public void changeCultivateViewCultivateBtn(boolean type) {
        try {
            radioBtnOne.setVisible(type);
            radioBtnTwo.setVisible(type);
            radioLabOne.setVisible(type);
            radioLabTwo.setVisible(type);
            nowEquipBtn.setVisible(type);
            equipBackImgOne.setVisible(type);
            equipBackImgTwo.setVisible(type);
            equipImgOne.setVisible(type);
            equipImgTwo.setVisible(type);
            textLabOne.setVisible(type);
            textLabTwo.setVisible(type);
            if (type) {
                this.concealNowEquip();
                this.recoverEquipImgTwo();
                this.money = new BigDecimal(100000);
                String style = MyIsif.getStyle();
                if ("水墨UI".equals(style)) {
                    nowEquipBtn.setBounds(89 + 20, 120 - 12, 68, 17);
                    radioBtnOne.setBounds(87 + 20, 77 - 12, 18, 18);
                    radioBtnTwo.setBounds(181 + 20, 77 - 12, 18, 18);
                    radioLabOne.setBounds(87 + 20 + 21, 77 - 12, 60, 20);
                    radioLabTwo.setBounds(181 + 20 + 21, 77 - 12, 60, 20);
                    equipBackImgOne.setBounds(91 + 20, 138 - 12, 59, 57);
                    equipBackImgTwo.setBounds(207 + 20, 138 - 12, 59, 57);
                    equipImgOne.setBounds(93 + 20, 140 - 12, 55, 53);
                    equipImgTwo.setBounds(209 + 20, 140 - 12, 55, 53);
                    textLabOne.setBounds(82 + 20, 228 - 12, 60, 18);
                    textLabTwo.setBounds(82 + 20, 252 - 12, 60, 18);
                    radioLabOne.setText("培养");
                    radioLabTwo.setText("分解");
                    ackBtn.setText("培养");
                } else {
                    //
                    this.nowEquipBtn.setBounds(89, 120, 60, 17);
                    this.radioBtnOne.setBounds(87, 77, 19, 19);
                    this.radioBtnTwo.setBounds(181, 77, 19, 19);
                    this.radioLabOne.setBounds(108, 77, 60, 20);
                    this.radioLabTwo.setBounds(202, 77, 60, 20);
                    this.equipBackImgOne.setBounds(91, 138, 59, 57);
                    this.equipBackImgTwo.setBounds(207, 138, 59, 57);
                    this.equipImgOne.setBounds(93, 140, 55, 53);
                    this.equipImgTwo.setBounds(209, 140, 55, 53);
                    this.textLabOne.setBounds(82, 228, 60, 18);
                    this.textLabTwo.setBounds(82, 252, 60, 18);
                    this.radioLabOne.setText("培养");
                    this.radioLabTwo.setText("分解");
                    this.ackBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/按钮_培养_w60,h78.png"));
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * 培养菜单面板的分解界面单选按钮
     */
    public void changeCultivateViewResolveBtn(boolean type) {
        try {
            this.radioBtnOne.setVisible(type);
            this.radioBtnTwo.setVisible(type);
            this.equipBackImgOne.setVisible(type);
            this.radioLabOne.setVisible(type);
            this.radioLabTwo.setVisible(type);
            this.equipImgOne.setVisible(type);
            if (type) {
                this.concealNowEquip();
                String style = MyIsif.getStyle();
                if ("水墨UI".equals(style)) {
                    textLabOne.setBounds(82 + 20, 228 - 12, 60, 18);
                    textLabTwo.setBounds(82 + 20, 252 - 12, 60, 18);
                    radioLabOne.setBounds(87 + 20 + 21, 77 - 12, 60, 20);
                    radioLabTwo.setBounds(181 + 20 + 21, 77 - 12, 60, 20);
                    equipBackImgOne.setBounds(144 + 20, 131 - 12, 59, 57);
                    equipImgOne.setBounds(144 + 20 + 2, 131 + 2 - 12, 55, 53);
                    radioLabOne.setText("培养");
                    radioLabTwo.setText("分解");
                    ackBtn.setText("分解");
                } else {
                    //
                    this.textLabOne.setBounds(82, 228, 60, 18);
                    this.textLabTwo.setBounds(82, 252, 60, 18);
                    this.radioLabOne.setBounds(108, 77, 60, 20);
                    this.radioLabTwo.setBounds(202, 77, 60, 20);
                    this.equipBackImgOne.setBounds(144, 131, 59, 57);
                    this.equipImgOne.setBounds(146, 133, 55, 53);
                    this.radioLabOne.setText("培养");
                    this.radioLabTwo.setText("分解");
                    this.ackBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/按钮_分解_w60,h78.png"));
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * 重铸菜单面板的重洗属性界面单选按钮
     *
     * @param type
     */
    public void changeRecastViewAttributeBtn(boolean type) {
        try {
            this.radioBtnOne.setVisible(type);
            this.radioBtnTwo.setVisible(type);
            this.radioLabOne.setVisible(type);
            this.radioLabTwo.setVisible(type);
            this.textLabOne.setVisible(type);
            this.textLabTwo.setVisible(type);
            this.nowEquipBtn.setVisible(type);
            this.equipBackImgOne.setVisible(type);
            this.equipImgOne.setVisible(type);

            for (int i = 0; i < this.washGoodsLabs.length; ++i) {
                this.washGoodsLabs[i].setVisible(type);
            }

            if (type) {
                this.concealNowEquip();
                this.recoverWashGoodsLabs(-1);
                this.money = new BigDecimal(100000);
                String style = MyIsif.getStyle();
                if ("水墨UI".equals(style)) {
                    textLabOne.setBounds(82 + 20, 240 - 12, 60, 18);
                    textLabTwo.setBounds(82 + 20, 240 - 12 + 24, 60, 18);
                    nowEquipBtn.setBounds(139 + 20, 107 - 12, 68, 17);
                    equipBackImgOne.setBounds(139 + 20 + 2, 107 - 12 + 18, 59, 57);
                    equipImgOne.setBounds(139 + 20 + 2 + 2, 107 - 12 + 18 + 2, 55, 53);
                    radioLabOne.setText("重洗属性");
                    radioLabTwo.setText("重悟技能");
                    ackBtn.setText("重洗");
                } else {
                    //
                    this.textLabOne.setBounds(82, 240, 60, 18);
                    this.textLabTwo.setBounds(82, 264, 60, 18);
                    this.nowEquipBtn.setBounds(139, 107, 60, 17);
                    this.equipBackImgOne.setBounds(141, 125, 59, 57);
                    this.equipImgOne.setBounds(143, 127, 55, 53);
                    this.radioLabOne.setText("重洗属性");
                    this.radioLabTwo.setText("重悟技能");
                    this.ackBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/按钮_重洗_w60,h78.png"));
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * 重铸菜单面板的重悟技能界面单选按钮
     *
     * @param type
     */
    public void changeRecastViewSkillBtn(boolean type) {
        try {
            this.radioBtnOne.setVisible(type);
            this.radioBtnTwo.setVisible(type);
            this.radioLabOne.setVisible(type);
            this.radioLabTwo.setVisible(type);
            this.equipImgOne.setVisible(type);
            this.equipImgTwo.setVisible(type);
            this.nowEquipBtn.setVisible(type);
            this.equipBackImgOne.setVisible(type);
            this.equipBackImgTwo.setVisible(type);
            this.textLabOne.setVisible(type);
            this.textLabTwo.setVisible(type);
            if (JframeReclaimSkillMain.getJframeReclaimSkillMain().isVisible()) {
                JframeReclaimSkillMain.getJframeReclaimSkillMain().setVisible(false);
            }

            if (type) {
                this.concealNowEquip();
                this.recoverEquipImgTwo();
                this.money = new BigDecimal(500000);

                String style = MyIsif.getStyle();
                if ("水墨UI".equals(style)) {
                    textLabOne.setBounds(80 + 20, 211 - 12, 60, 18);
                    textLabTwo.setBounds(80 + 20, 211 - 12 + 24, 60, 18);
                    equipBackImgOne.setBounds(91 + 20, 138 - 12, 59, 57);
                    equipBackImgTwo.setBounds(207 + 20, 138 - 12, 59, 57);
                    equipImgOne.setBounds(93 + 20, 140 - 12, 55, 53);
                    equipImgTwo.setBounds(209 + 20, 140 - 12, 55, 53);
                    radioLabOne.setText("重洗属性");
                    radioLabTwo.setText("重悟技能");
                    nowEquipBtn.setBounds(91 + 20 - 2, 138 - 18 - 12, 68, 17);
                    ackBtn.setText("重悟");
                } else {
                    //
                    this.textLabOne.setBounds(80, 211, 60, 18);
                    this.textLabTwo.setBounds(80, 235, 60, 18);
                    this.equipBackImgOne.setBounds(91, 138, 59, 57);
                    this.equipBackImgTwo.setBounds(207, 138, 59, 57);
                    this.equipImgOne.setBounds(93, 140, 55, 53);
                    this.equipImgTwo.setBounds(209, 140, 55, 53);
                    this.radioLabOne.setText("重洗属性");
                    this.radioLabTwo.setText("重悟技能");
                    this.nowEquipBtn.setBounds(89, 120, 60, 17);
                    this.ackBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/按钮_重悟_w60,h78.png"));
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }

    }

    /**
     * 觉醒面板的提升等级界面单选按钮
     *
     * @param type
     */
    public void changeAwakenViewUpgradeBtn(boolean type) {
        try {
            this.radioBtnOne.setVisible(type);
            this.radioBtnTwo.setVisible(type);
            this.radioLabOne.setVisible(type);
            this.radioLabTwo.setVisible(type);
            this.equipBackImgOne.setVisible(type);
            this.equipImgOne.setVisible(type);
            this.nowEquipBtn.setVisible(type);
            this.textLabOne.setVisible(type);
            this.textLabTwo.setVisible(type);
            this.maxNumBtn.setVisible(type);
            this.upgradeLab.setVisible(type);
            this.nowNumLab.setVisible(type);
            this.numText.setVisible(type);
            this.recoverSkillMessage();
            if (type) {
                this.concealNowEquip();
                this.money = new BigDecimal(6000);
                this.numText.setText("0");
                this.nowNumLab.setText("<html><body>(拥有:<font color=#FFFF00>" + RoleData.getRoleData().getLoginResult().getScoretype("比斗奖章").toString() + "</font>)</body><html>");
                String style = MyIsif.getStyle();
                if ("水墨UI".equals(style)) {
                    equipBackImgOne.setBounds(67 + 20, 120 - 12, 59, 57);
                    equipImgOne.setBounds(67 + 20 + 2, 120 - 12 + 2, 55, 53);
                    nowEquipBtn.setBounds(67 + 20 - 2, 120 - 12 - 18, 68, 17);
                    radioBtnOne.setBounds(87 + 20, 77 - 12, 18, 18);
                    radioLabOne.setBounds(87 + 20 + 21, 77 - 12, 60, 20);
                    radioBtnTwo.setBounds(181 + 20, 77 - 12, 18, 18);
                    radioLabTwo.setBounds(181 + 20 + 21, 77 - 12, 60, 20);
                    textLabOne.setBounds(142 + 20 - 64, 182 - 12 + 65, 60, 18);
                    textLabTwo.setBounds(142 + 20 - 64, 182 - 12 + 65 + 24, 60, 18);
                    radioLabOne.setText("提升等级");
                    radioLabTwo.setText("开启觉醒");
                    ackBtn.setText("提升");
                } else {
                    //
                    this.equipBackImgOne.setBounds(67, 120, 59, 57);
                    this.equipImgOne.setBounds(69, 122, 55, 53);
                    this.nowEquipBtn.setBounds(65, 102, 60, 17);
                    this.radioBtnOne.setBounds(87, 77, 19, 19);
                    this.radioLabOne.setBounds(108, 77, 60, 20);
                    this.radioBtnTwo.setBounds(181, 77, 19, 19);
                    this.radioLabTwo.setBounds(202, 77, 60, 20);
                    this.textLabOne.setBounds(78, 247, 60, 18);
                    this.textLabTwo.setBounds(78, 271, 60, 18);
                    this.radioLabOne.setText("提升等级");
                    this.radioLabTwo.setText("开启觉醒");
                    this.ackBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/按钮_提升_w60,h78.png"));
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * 觉醒面板的开启觉醒界面单选按钮
     *
     * @param type
     */
    public void changeAwakenViewOpenawakenBtn(boolean type) {
        try {
            this.radioBtnOne.setVisible(type);
            this.radioBtnTwo.setVisible(type);
            this.radioLabOne.setVisible(type);
            this.radioLabTwo.setVisible(type);
            this.equipImgOne.setVisible(type);
            this.equipImgTwo.setVisible(type);
            this.nowEquipBtn.setVisible(type);
            this.equipBackImgOne.setVisible(type);
            this.equipBackImgTwo.setVisible(type);
            this.textLabOne.setVisible(type);
            this.textLabTwo.setVisible(type);
            if (type) {
                this.concealNowEquip();
                this.money = new BigDecimal(10000000);
                String style = MyIsif.getStyle();
                if ("水墨UI".equals(style)) {
                    textLabOne.setBounds(80 + 20, 211 - 12, 60, 18);
                    textLabTwo.setBounds(80 + 20, 211 - 12 + 24, 60, 18);
                    equipBackImgOne.setBounds(91 + 20, 138 - 12, 59, 57);
                    equipBackImgTwo.setBounds(207 + 20, 138 - 12, 59, 57);
                    equipImgOne.setBounds(93 + 20, 140 - 12, 55, 53);
                    equipImgTwo.setBounds(209 + 20, 140 - 12, 55, 53);
                    radioLabOne.setText("提升等级");
                    radioLabTwo.setText("开启觉醒");
                    recoverEquipImgTwo();
                    nowEquipBtn.setBounds(91 + 20 - 2, 138 - 12 - 18, 68, 17);
                    ackBtn.setText("开启");
                } else {
                    //
                    this.textLabOne.setBounds(80, 211, 60, 18);
                    this.textLabTwo.setBounds(80, 235, 60, 18);
                    this.equipBackImgOne.setBounds(91, 138, 59, 57);
                    this.equipBackImgTwo.setBounds(207, 138, 59, 57);
                    this.equipImgOne.setBounds(93, 140, 55, 53);
                    this.equipImgTwo.setBounds(209, 140, 55, 53);
                    this.radioLabOne.setText("提升等级");
                    this.radioLabTwo.setText("开启觉醒");
                    this.recoverEquipImgTwo();
                    this.nowEquipBtn.setBounds(89, 120, 60, 17);
                    this.ackBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/按钮_开启_w60,h78.png"));
                }
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    /**
     * 隐藏面板
     */
    public void concealNowEquip() {
        if (jpanelNowEquip.isVisible()) {
            jpanelNowEquip.setVisible(false);
        }
        if (scrollPane.isVisible()) {
            scrollPane.setVisible(false);
        }
    }

    /**
     * 单选按钮的界面切换
     */
    public void chooseRadioBtn(int type) {
        if (this.radioBtnType != type) {
            this.recoverEquipImgOne();
            this.refreshView(this.summonEquipMenuType, this.radioBtnType, false);
            this.radioBtnType = type;
            this.refreshView(this.summonEquipMenuType, this.radioBtnType, true);
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                if (radioBtnType == 1) {
                    radioBtnOne.setIcon(CutButtonImage.getImage("skin/8100226/button/B214.png", 18, 18));
                    radioBtnTwo.setIcon(CutButtonImage.getImage("skin/8100226/button/B213.png", 18, 18));
                } else {
                    radioBtnOne.setIcon(CutButtonImage.getImage("skin/8100226/button/B213.png", 18, 18));
                    radioBtnTwo.setIcon(CutButtonImage.getImage("skin/8100226/button/B214.png", 18, 18));
                }
            } else {
                //
                if (this.radioBtnType == 1) {
                    this.radioBtnOne.setIcon(CutButtonImage.getImage("img/xy2uiimg/单选按钮_选中_w19,h19.png", 19, 19));
                    this.radioBtnTwo.setIcon(CutButtonImage.getImage("img/xy2uiimg/单选按钮_未选中_w19,h19.png", 19, 19));
                } else {
                    this.radioBtnOne.setIcon(CutButtonImage.getImage("img/xy2uiimg/单选按钮_未选中_w19,h19.png", 19, 19));
                    this.radioBtnTwo.setIcon(CutButtonImage.getImage("img/xy2uiimg/单选按钮_选中_w19,h19.png", 19, 19));
                }
            }
        }
    }

    /**
     * 点击菜单按钮切换面板时单选按钮的切换
     */
    public void changeViewChooseRadioBtn() {
        this.radioBtnType = 1;
        this.concealNowEquip();
        this.recoverEquipImgOne();
        String style = MyIsif.getStyle();
        if ("水墨UI".equals(style)) {
            radioBtnOne.setIcon(CutButtonImage.getImage("skin/8100226/button/B214.png", 18, 18));
            radioBtnTwo.setIcon(CutButtonImage.getImage("skin/8100226/button/B213.png", 18, 18));
            try {
                if (summonEquipMenuType == 1) {
                    cultivateMenuBtn.setIcons(CutButtonImage.cuts("skin/8100226/button/B218.png"));
                    recastMenuBtn.setIcons(CutButtonImage.cuts("skin/8100226/button/B199.png"));
                    awakenMenuBtn.setIcons(CutButtonImage.cuts("skin/8100226/button/B215.png"));
                } else if (summonEquipMenuType == 2) {
                    cultivateMenuBtn.setIcons(CutButtonImage.cuts("skin/8100226/button/B217.png"));
                    recastMenuBtn.setIcons(CutButtonImage.cuts("skin/8100226/button/B200.png"));
                    awakenMenuBtn.setIcons(CutButtonImage.cuts("skin/8100226/button/B215.png"));
                } else if (summonEquipMenuType == 3) {
                    cultivateMenuBtn.setIcons(CutButtonImage.cuts("skin/8100226/button/B217.png"));
                    recastMenuBtn.setIcons(CutButtonImage.cuts("skin/8100226/button/B199.png"));
                    awakenMenuBtn.setIcons(CutButtonImage.cuts("skin/8100226/button/B216.png"));
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        } else {
            // 
            this.radioBtnOne.setIcon(CutButtonImage.getImage("img/xy2uiimg/单选按钮_选中_w19,h19.png", 19, 19));
            this.radioBtnTwo.setIcon(CutButtonImage.getImage("img/xy2uiimg/单选按钮_未选中_w19,h19.png", 19, 19));
            try {
                if (this.summonEquipMenuType == 1) {
                    this.cultivateMenuBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/小选项卡_培养_选中_w63,h78.png"));
                    this.recastMenuBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/小选项卡_重铸_未选中_w63,h78.png"));
                    this.awakenMenuBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/小选项卡_觉醒_未选中_w63,h78.png"));
                } else if (this.summonEquipMenuType == 2) {
                    this.cultivateMenuBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/小选项卡_培养_未选中_w63,h78.png"));
                    this.recastMenuBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/小选项卡_重铸_选中_w63,h78.png"));
                    this.awakenMenuBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/小选项卡_觉醒_未选中_w63,h78.png"));
                } else if (this.summonEquipMenuType == 3) {
                    this.cultivateMenuBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/小选项卡_培养_未选中_w63,h78.png"));
                    this.recastMenuBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/小选项卡_重铸_未选中_w63,h78.png"));
                    this.awakenMenuBtn.setIcons(CutButtonImage.cuts("img/xy2uiimg/小选项卡_觉醒_选中_w63,h78.png"));
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }

    /**
     * 恢复当前界面的第二个图片框equipImgTwo
     */
    public void recoverEquipImgTwo() {
        if (summonEquipMenuType == 1 && radioBtnType == 1) {
            equipImgTwo.setText("玄铁晶石");
        } else if (summonEquipMenuType == 2 && radioBtnType == 2) {
            equipImgTwo.setText("隐月神石");
        } else if (summonEquipMenuType == 3 && radioBtnType == 2) {
            equipImgTwo.setText("千年魂石");
        }
        equipImgTwo.setIcon(null);
        chooseGoods = null;
    }

    /**
     * 恢复当前界面的第一个图片框equipImgOne
     */
    public void recoverEquipImgOne() {
        equipImgOne.setText("装备");
        equipImgOne.setIcon(null);

        recoverSkillMessage();
        chooseEquip = null;
    }

    /**
     * 刷新第一个图片框equipImgOne
     */
    public void refreshEquipOneImg(Goodstable goodstable) {
        if (goodstable != null) {
            equipImgOne.setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 55, 53));
        } else {
            recoverEquipImgOne();
        }
    }

    public void recoverSkillMessage() {
        upgradeLab.setForeground(Color.gray);
        upgradeLab.setText("请放入已有觉醒技的装备");
        // upgradeLab.setVisible(true);
        awakenName.setVisible(false);
        levelLab.setVisible(false);
        expBackLabImg.setVisible(false);
        expLab.setVisible(false);
        expLabImg.setVisible(false);
    }

    /**
     * 恢复重洗技能的五个格子材料框
     */
    public void recoverWashGoodsLabs(int num) {
        if (chooseWashGoods == null) {
            getChooseWashGoods();
        }
        if (num < 0) {
            for (int i = 0; i < 5; i++) {
                chooseWashGoods[i] = null;
                if (i == 0) {
                    washGoodsLabs[i].setText("晶石");
                } else if (i == 1) {
                    washGoodsLabs[i].setText("精华");
                } else {
                    washGoodsLabs[i].setText("九彩");
                }
                washGoodsLabs[i].setIcon(null);
            }
        } else {
            chooseWashGoods[num] = null;
            if (num == 0) {
                washGoodsLabs[num].setText("晶石");
            } else if (num == 1) {
                washGoodsLabs[num].setText("精华");
            } else {
                washGoodsLabs[num].setText("九彩");
            }
            washGoodsLabs[num].setIcon(null);
        }
    }

    /**
     * 拆解value获取对应的属性<br>
     * 等级=xxx|装备部位=xxx|等级需求=xxx| {黄字属性} |品质=xxx|通灵=xxx| {炼化属性} | {觉醒技属性}
     */
    public String getValuesMessage(String[] values, String strType) {
        for (int i = 0; i < values.length; i++) {
            if (values[i].startsWith(strType)) {
                if ("觉醒技".equals(strType)) {
                    return values[i];
                } else {
                    return values[i].split("=")[1];
                }
            }
        }
        return null;
    }

    /**
     * 经验换算等级
     */
    public static long expChangeLevel(long exp) {
        int i = 1;
        while (i <= 20) {
            long num = (i * 250 + 50 + 300) * i / 2;
            if (num > exp) {
                return i;
            }
            i++;
        }
        return 20;
    }

    /**
     * 获取当前等级总经验
     */
    public static long getMaxExp(long level) {
        return level * 250 + 50;
    }

    /**
     * 获取当前经验
     */
    public static long getNowExp(long exp) {
        long maxExp = expChangeLevel(exp);
        long num = ((maxExp - 1) * 250 + 50 + 300) * (maxExp - 1) / 2;
        return exp - num;
    }

    /**
     * 获取滚动条里面的内容已经当前召唤兽装备
     */
    public void getpaneMessage() {
        summonNamesModel.clear();
        summonList.clear();
        jpanelNowEquip.getSummonEquipList().clear();
        int maxNum = 0;
        // summonNamesModel.add(index, element);
        List<RoleSummoning> petListTable = UserMessUntil.getPetListTable();
        for (int i = 0; i < petListTable.size(); i++) {
            RoleSummoning roleSummoning = petListTable.get(i);
            String stye = roleSummoning.getStye();
            if (stye != null && stye.length() > 1) {
                String[] v = stye.split("\\|");
                ArrayList<Goodstable> summonEquips = getSummonEquips(v);
                if (summonEquips.size() == 0) {
                    continue;
                }
                maxNum += summonEquips.size();
                summonList.add(roleSummoning.getSid());
                summonNamesModel.addElement(roleSummoning.getSummoningname() + "(" + summonEquips.size() + ")");
            }
        }
        summonNamesModel.add(0, "全部(" + maxNum + ")");
        jpanelNowEquip.getShowName().setText("全部(" + maxNum + ")");

    }

    /**
     * 获取当前召唤兽的装备
     */
    public ArrayList<Goodstable> getSummonEquips(String[] v) {
        ArrayList<Goodstable> goodstables = new ArrayList<>();
        for (int i = 1; i < v.length; i++) {
            String[] vs = v[i].split("-");
            if (vs.length >= 2) {
                if (!"3".equals(vs[0])) {
                    Goodstable goodstable = GoodsListFromServerUntil.fushis.get(new BigDecimal(vs[1]));
                    jpanelNowEquip.getSummonEquipList().add(goodstable.getRgid());
                    goodstables.add(goodstable);
                }
            }
        }
        return goodstables;
    }

    /**
     * 选中当前的召唤兽
     */
    public RoleSummoning getSummonOne(BigDecimal type) {
        List<RoleSummoning> petListTable = UserMessUntil.getPetListTable();
        for (int i = 0; i < petListTable.size(); i++) {
            RoleSummoning roleSummoning = petListTable.get(i);
            if (roleSummoning.getSid().compareTo(type) == 0) {
                return roleSummoning;
            }
        }
        return null;
    }

    /**
     * 选中召唤兽装备
     */
    public void chooseEquip(Goodstable goodstable) {
        // 选中物品
        chooseEquip = goodstable.getRgid();
        equipImgOne.setText("");
        equipImgOne.setIcon(GoodsListFromServerUntil.imgpathAdaptive(goodstable.getSkin(), 55, 53));
    }

    /**
     * 刷新技能展示机制
     */
    public void skillMessage(String[] awakenSkill) {
        awakenName.setText("觉醒技:" + awakenSkill[0]);
        levelLab.setText("等  级:" + expChangeLevel(Long.parseLong(awakenSkill[3])));
        long nowExp = getNowExp(Long.parseLong(awakenSkill[3]));
        long maxExp = getMaxExp(expChangeLevel(Long.parseLong(awakenSkill[3])));
        expLab.setText("经  验:" + nowExp + "/" + maxExp);
        /** 计算经验条 */
        int divide = new BigDecimal(nowExp).multiply(new BigDecimal(102))
                .divide(new BigDecimal(maxExp), 2, BigDecimal.ROUND_HALF_UP).intValue();
        String style = MyIsif.getStyle();
        if ("水墨UI".equals(style)) {
            expLabImg.setIcon(CutButtonImage.getImage("skin/8100226/button/26.png", divide == 0 ? 1 : divide, 12));
        } else {
            expLabImg.setIcon(CutButtonImage.getImage("img/xy2uiimg/经验_条_102,h8.png", divide == 0 ? 1 : divide, 12));
        }
    }

    /**
     * 提升技能判断时候有觉醒技
     */
    public void getAwakenSkill() {
        if (getSummonEquipMenuType() == 3 && getRadioBtnType() == 1) {
            if (getChooseEquip() == null) {
                ZhuFrame.getZhuJpanel().addPrompt2("请选择召唤兽装备");
                return;
            }
            Goodstable chooseEquip = GoodsListFromServerUntil.getRgid(getChooseEquip());
            if (chooseEquip == null) {
                ZhuFrame.getZhuJpanel().addPrompt2("请选择召唤兽装备");
                return;
            }
            String[] values = chooseEquip.getValue().split("\\|");
            String valuesMessage = getValuesMessage(values, "觉醒技");
            if (valuesMessage == null) {
                getUpgradeLab().setForeground(Color.red);
                getUpgradeLab().setText("该装备还没有觉醒技");
                getUpgradeLab().setVisible(true);
                getExpLabImg().setVisible(false);
                getAwakenName().setVisible(false);
                getLevelLab().setVisible(false);
                getExpBackLabImg().setVisible(false);
                getExpLab().setVisible(false);
            } else {
                String[] awakenSkill = valuesMessage.split("&");
                skillMessage(awakenSkill);

                getUpgradeLab().setVisible(false);
                getExpLabImg().setVisible(true);
                getAwakenName().setVisible(true);
                getLevelLab().setVisible(true);
                getExpBackLabImg().setVisible(true);
                getExpLab().setVisible(true);
            }
        }
    }

    /**
     * 图片背景
     */
    private ImageIcon iconBack;
    /**
     * 两个输入框图片textLabImg
     */
    private ImageIcon textLabImg;
    /**
     * 重铸_重洗框
     */
    private ImageIcon recastWashImg;
    /**
     * 框_觉醒技能装备
     */
    private ImageIcon awakenUpLvlImg;

    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        String style = MyIsif.getStyle();
        if ("水墨UI".equals(style)) {
            if (iconBack == null) {
                iconBack = CutButtonImage.getImage("inkImg/newbackground/B297.png", 382, 455);
            }
            g.drawImage(iconBack.getImage(), 0, 0, 382, 455, this);
            if (textLabImg == null) {
                textLabImg = CutButtonImage.getImage("inkImg/old/background/S128.png", 124, 42);
            }
            if (recastWashImg == null) {
                recastWashImg = CutButtonImage.getImage("inkImg/old/background/S129.png", 250, 50);
            }
            if (awakenUpLvlImg == null) {
                awakenUpLvlImg = CutButtonImage.getImage("inkImg/old/background/S130.png", 165, 56);
            }
            GoodsListFromServerUntil.drawSummonGoods(g, 26 + 20, 327 - 12);
            if (summonEquipMenuType == 1 && radioBtnType == 1) {
                g.drawImage(textLabImg.getImage(), 146 + 20, 229 - 12, 124, 42, this);
                Util.drawMoney(g, 148 + 20, 267 - 12);
                Util.drawPrice(g, money, 148 + 20, 267 - 24 - 12);
            } else if (summonEquipMenuType == 2 && radioBtnType == 1) {
                g.drawImage(textLabImg.getImage(), 82 + 20 + 64, 240 - 12 + 1, 124, 42, this);
                g.drawImage(recastWashImg.getImage(), 48 + 20, 187 - 12, recastWashImg.getIconWidth(),
                        recastWashImg.getIconHeight(), this);
                Util.drawMoney(g, 82 + 20 + 64 + 2, 240 - 12 + 1 + 38);
                Util.drawPrice(g, money, 82 + 20 + 64 + 2, 240 - 12 + 1 + 38 - 24);
            } else if (summonEquipMenuType == 2 && radioBtnType == 2) {
                g.drawImage(textLabImg.getImage(), 80 + 20 + 64, 211 - 12 + 1, 124, 42, this);
                Util.drawMoney(g, 80 + 20 + 64 + 2, 211 - 12 + 1 + 38);
                Util.drawPrice(g, money, 80 + 20 + 64 + 2, 211 - 12 + 1 + 38 - 24);
            } else if (summonEquipMenuType == 3 && radioBtnType == 1) {
                g.drawImage(textLabImg.getImage(), 142 + 20, 182 - 12, 124, 42, this);
                g.drawImage(textLabImg.getImage(), 142 + 20, 182 - 12 + 65, 124, 42, this);
                g.setFont(UIUtils.TEXT_FONT);
                g.setColor(Color.white);
                g.drawString("消耗物品", 142 + 20 - 64, 197 - 12);
                g.drawString("比斗奖章", 142 + 20 + 2, 197 - 12);
                g.drawString("消耗奖章", 142 + 20 - 64, 197 - 12 + 24);
                g.drawImage(awakenUpLvlImg.getImage(), 130 + 20, 120 - 12, 165, 56, this);
                Util.drawMoney(g, 142 + 20 + 2, 182 - 12 + 65 + 1 + 38);
                Util.drawPrice(g, money, 142 + 20 + 2, 182 - 12 + 65 + 1 + 38 - 24);
            } else if (summonEquipMenuType == 3 && radioBtnType == 2) {
                g.drawImage(textLabImg.getImage(), 80 + 20 + 64, 211 - 12 + 1, 124, 45, this);
                Util.drawMoney(g, 80 + 20 + 64 + 2, 211 - 12 + 1 + 38);
                Util.drawPrice(g, money, 80 + 20 + 64 + 2, 211 - 12 + 1 + 38 - 24);
            }
        } else {
            // 
            if (this.iconBack == null) {
                this.iconBack = CutButtonImage.getImage("img/xy2uiimg/装备炼化_底板_w356,h477.png", 356, 477);
            }

            g.drawImage(this.iconBack.getImage(), 0, 0, 356, 477, this);
            if (this.textLabImg == null) {
                this.textLabImg = CutButtonImage.getImage("img/xy2uiimg/输入框_双框_w124,h45.png", 124, 45);
            }

            if (this.recastWashImg == null) {
                this.recastWashImg = CutButtonImage.getImage("img/xy2uiimg/重铸_重洗框_w250,h50.png", 250, 50);
            }

            if (this.awakenUpLvlImg == null) {
                this.awakenUpLvlImg = CutButtonImage.getImage("img/xy2uiimg/框_觉醒技能装备_w165,h56.png", 165, 56);
            }

            GoodsListFromServerUntil.drawSummonGoods(g, 26, 327);
            if (this.summonEquipMenuType == 1 && this.radioBtnType == 1) {
                g.drawImage(this.textLabImg.getImage(), 146, 229, 124, 45, this);
                Util.drawMoney(g, 148, 267);
                Util.drawPrice(g, this.money, 148, 243);
            } else if (this.summonEquipMenuType == 2 && this.radioBtnType == 1) {
                g.drawImage(this.textLabImg.getImage(), 146, 241, 124, 45, this);
                g.drawImage(this.recastWashImg.getImage(), 48, 187, this.recastWashImg.getIconWidth(), this.recastWashImg.getIconHeight(), this);
                Util.drawMoney(g, 148, 279);
                Util.drawPrice(g, this.money, 148, 255);
            } else if (this.summonEquipMenuType == 2 && this.radioBtnType == 2) {
                g.drawImage(this.textLabImg.getImage(), 144, 212, 124, 45, this);
                Util.drawMoney(g, 146, 250);
                Util.drawPrice(g, this.money, 146, 226);
            } else if (this.summonEquipMenuType == 3 && this.radioBtnType == 1) {
                g.drawImage(this.textLabImg.getImage(), 142, 182, 124, 45, this);
                g.drawImage(this.textLabImg.getImage(), 142, 247, 124, 45, this);
                g.setFont(UIUtils.TEXT_FONT);
                g.setColor(Color.white);
                g.drawString("消耗物品", 78, 197);
                g.drawString("比斗奖章", 144, 197);
                g.drawString("消耗奖章", 78, 221);
                g.drawImage(this.awakenUpLvlImg.getImage(), 130, 120, 165, 56, this);
                Util.drawMoney(g, 144, 286);
                Util.drawPrice(g, this.money, 144, 262);
            } else if (this.summonEquipMenuType == 3 && this.radioBtnType == 2) {
                g.drawImage(this.textLabImg.getImage(), 144, 212, 124, 45, this);
                Util.drawMoney(g, 146, 250);
                Util.drawPrice(g, this.money, 146, 226);
            }
        }

    }

    public ImageIcon getIconBack() {
        return iconBack;
    }

    public void setIconBack(ImageIcon iconBack) {
        this.iconBack = iconBack;
    }

    public ImageIcon getTextLabImg() {
        return textLabImg;
    }

    public void setTextLabImg(ImageIcon textLabImg) {
        this.textLabImg = textLabImg;
    }

    public BigDecimal getMoney() {
        return money;
    }

    public void setMoney(BigDecimal money) {
        this.money = money;
    }

    public ImageIcon getRecastWashImg() {
        return recastWashImg;
    }

    public void setRecastWashImg(ImageIcon recastWashImg) {
        this.recastWashImg = recastWashImg;
    }

    public ImageIcon getAwakenUpLvlImg() {
        return awakenUpLvlImg;
    }

    public void setAwakenUpLvlImg(ImageIcon awakenUpLvlImg) {
        this.awakenUpLvlImg = awakenUpLvlImg;
    }

    public JLabel getRadioBtnOne() {
        if (radioBtnOne == null) {
            radioBtnOne = new JLabel();
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                radioBtnOne.setIcon(CutButtonImage.getImage("skin/8100226/button/B214.png", 18, 18));
                radioBtnOne.setBounds(87 + 20, 77 - 12, 18, 18);
            } else {
                radioBtnOne.setIcon(CutButtonImage.getImage("img/xy2uiimg/单选按钮_选中_w19,h19.png", 19, 19));
                radioBtnOne.setBounds(87, 77, 19, 19);
            }
            radioBtnOne.setOpaque(false);
            radioBtnOne.addMouseListener(new MouseAdapter() {
                @Override
                public void mousePressed(MouseEvent e) {
                    chooseRadioBtn(1);
                }
            });
            this.add(radioBtnOne);
        }
        return radioBtnOne;
    }

    public void setRadioBtnOne(JLabel radioBtnOne) {
        this.radioBtnOne = radioBtnOne;
    }

    public JLabel getRadioBtnTwo() {
        if (radioBtnTwo == null) {
            radioBtnTwo = new JLabel();
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                radioBtnTwo.setIcon(CutButtonImage.getImage("skin/8100226/button/B213.png", 18, 18));
                radioBtnTwo.setBounds(181 + 20, 77 - 12, 18, 18);
            } else {
                radioBtnTwo.setIcon(CutButtonImage.getImage("img/xy2uiimg/单选按钮_未选中_w19,h19.png", 18, 18));
                radioBtnTwo.setBounds(181, 77, 19, 19);
            }
            radioBtnTwo.setOpaque(false);
            radioBtnTwo.addMouseListener(new MouseAdapter() {
                @Override
                public void mousePressed(MouseEvent e) {
                    chooseRadioBtn(2);
                }
            });
            this.add(radioBtnTwo);
        }
        return radioBtnTwo;
    }

    public void setRadioBtnTwo(JLabel radioBtnTwo) {
        this.radioBtnTwo = radioBtnTwo;
    }

    public JLabel getRadioLabOne() {
        if (radioLabOne == null) {
            radioLabOne = new JLabel("洗练属性");
            radioLabOne.setForeground(Color.white);
            radioLabOne.setFont(UIUtils.TEXT_FONT);
            radioLabOne.setBounds(108, 77, 60, 20);
            radioLabOne.setOpaque(false);
            this.add(radioLabOne);
        }
        return radioLabOne;
    }

    public void setRadioLabOne(JLabel radioLabOne) {
        this.radioLabOne = radioLabOne;
    }

    public JLabel getRadioLabTwo() {
        if (radioLabTwo == null) {
            radioLabTwo = new JLabel("重悟技能");
            radioLabTwo.setForeground(Color.white);
            radioLabTwo.setFont(UIUtils.TEXT_FONT);
            radioLabTwo.setBounds(202, 77, 60, 20);
            radioLabTwo.setOpaque(false);
            this.add(radioLabTwo);
        }
        return radioLabTwo;
    }

    public void setRadioLabTwo(JLabel radioLabTwo) {
        this.radioLabTwo = radioLabTwo;
    }

    public int getRadioBtnType() {
        return radioBtnType;
    }

    public void setRadioBtnType(int radioBtnType) {
        this.radioBtnType = radioBtnType;
    }

    public BtnSummonEquipMain getNowEquipBtn() {
        if (nowEquipBtn == null) {
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                nowEquipBtn = new BtnSummonEquipMain("skin/8100226/button/49.png", 1, UIUtils.COLOR_BTNTEXT, UIUtils.TEXT_FONT,
                        "已穿装备", 11, this);
                nowEquipBtn.setBounds(89 + 20, 120 - 12, 68, 17);
            } else {
                // 
                nowEquipBtn = new BtnSummonEquipMain("img/xy2uiimg/文字按钮_已穿装备_w60,h51.png", 1, UIUtils.COLOR_BTNTEXT, UIUtils.TEXT_FONT,
                        "", 11, this);
                nowEquipBtn.setBounds(89, 120, 60, 17);
            }
            this.add(nowEquipBtn);
        }
        return nowEquipBtn;
    }

    public void setNowEquipBtn(BtnSummonEquipMain nowEquipBtn) {
        this.nowEquipBtn = nowEquipBtn;
    }

    public int getSummonEquipMenuType() {
        return summonEquipMenuType;
    }

    public void setSummonEquipMenuType(int summonEquipMenuType) {
        this.summonEquipMenuType = summonEquipMenuType;
    }

    public JLabel getEquipImgOne() {
        if (equipImgOne == null) {
            equipImgOne = new JLabel("装备", SwingConstants.CENTER);
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                equipImgOne.setBounds(93 + 20, 140 - 12, 55, 53);
            } else {
                equipImgOne.setBounds(93, 140, 55, 53);
            }
            equipImgOne.setForeground(Color.gray);
            equipImgOne.setFont(UIUtils.TEXT_FONT);
            equipImgOne.addMouseListener(new MouseAdapter() {
                @Override
                public void mousePressed(MouseEvent e) {
                    if (e.getButton() == MouseEvent.BUTTON3) {
                        recoverEquipImgOne();
                    }
                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    if (chooseEquip != null) {
                        Goodstable goodstable = GoodsListFromServerUntil.getRgid(chooseEquip);
                        if (goodstable != null) {
                            ZhuFrame.getZhuJpanel().creatgoodtext(goodstable);
                        }
                    }
                }

                @Override
                public void mouseExited(MouseEvent e) {
                    TestpackJframe.getTestpackJframe().getJpac().ClearText();
                    ZhuFrame.getZhuJpanel().cleargoodtext();
                }
            });
            this.add(equipImgOne);
        }
        return equipImgOne;
    }

    public void setEquipImgOne(JLabel equipImgOne) {
        this.equipImgOne = equipImgOne;
    }

    public JLabel getEquipImgTwo() {
        if (equipImgTwo == null) {
            equipImgTwo = new JLabel("玄铁晶石", SwingConstants.CENTER);
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                equipImgTwo.setBounds(209 + 20, 140 - 12, 55, 53);
            } else {
                equipImgTwo.setBounds(209, 140, 55, 53);
            }
            equipImgTwo.setForeground(Color.gray);
            equipImgTwo.setFont(UIUtils.TEXT_FONT);
            equipImgTwo.addMouseListener(new MouseAdapter() {
                @Override
                public void mousePressed(MouseEvent e) {
                    if (e.getButton() == MouseEvent.BUTTON3) {
                        recoverEquipImgTwo();
                    }
                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    if (chooseGoods != null) {
                        Goodstable goodstable = GoodsListFromServerUntil.getRgid(chooseGoods);
                        if (goodstable == null) {
                            return;
                        }
                        ZhuFrame.getZhuJpanel().creatgoodtext(goodstable);
                    }
                }

                @Override
                public void mouseExited(MouseEvent e) {
                    TestpackJframe.getTestpackJframe().getJpac().ClearText();
                    ZhuFrame.getZhuJpanel().cleargoodtext();
                }

            });
            this.add(equipImgTwo);
        }
        return equipImgTwo;
    }

    public void setEquipImgTwo(JLabel equipImgTwo) {
        this.equipImgTwo = equipImgTwo;
    }

    public JLabel getEquipBackImgOne() {
        if (equipBackImgOne == null) {
            equipBackImgOne = new JLabel();
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                equipBackImgOne.setIcon(CutButtonImage.getImage("inkImg/old/background/S131.png", 59, 57));
                equipBackImgOne.setBounds(91 + 20, 138 - 12, 59, 57);
            } else {
                equipBackImgOne.setIcon(CutButtonImage.getImage("img/xy2uiimg/物品框_w59,h57.png", 59, 57));
                equipBackImgOne.setBounds(91, 138, 59, 57);
            }
            this.add(equipBackImgOne);
        }
        return equipBackImgOne;
    }

    public void setEquipBackImgOne(JLabel equipBackImgOne) {
        this.equipBackImgOne = equipBackImgOne;
    }

    public JLabel getEquipBackImgTwo() {
        if (equipBackImgTwo == null) {
            equipBackImgTwo = new JLabel();
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                equipBackImgTwo.setIcon(CutButtonImage.getImage("inkImg/old/background/S131.png", 59, 57));
                equipBackImgTwo.setBounds(207 + 20, 138 - 12, 59, 57);
            } else {
                // 
                equipBackImgTwo.setIcon(CutButtonImage.getImage("img/xy2uiimg/物品框_w59,h57.png", 59, 57));
                equipBackImgTwo.setBounds(207, 138, 59, 57);
            }
            this.add(equipBackImgTwo);
        }
        return equipBackImgTwo;
    }

    public void setEquipBackImgTwo(JLabel equipBackImgTwo) {
        this.equipBackImgTwo = equipBackImgTwo;
    }

    public JLabel getTextLabOne() {
        if (textLabOne == null) {
            textLabOne = new JLabel("消耗金钱");
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                textLabOne.setBounds(82 + 20, 228 - 12, 60, 18);
            } else {
                textLabOne.setBounds(82, 228, 60, 18);
            }
            textLabOne.setForeground(Color.white);
            textLabOne.setFont(UIUtils.TEXT_FONT);
            this.add(textLabOne);
        }
        return textLabOne;
    }

    public void setTextLabOne(JLabel textLabOne) {
        this.textLabOne = textLabOne;
    }

    public JLabel getTextLabTwo() {
        if (textLabTwo == null) {
            textLabTwo = new JLabel("拥有金钱");
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                textLabTwo.setBounds(82 + 20, 252 - 12, 60, 18);
            } else {
                textLabTwo.setBounds(82, 252, 60, 18);
            }
            textLabTwo.setForeground(Color.white);
            textLabTwo.setFont(UIUtils.TEXT_FONT);
            this.add(textLabTwo);
        }
        return textLabTwo;
    }

    public void setTextLabTwo(JLabel textLabTwo) {
        this.textLabTwo = textLabTwo;
    }

    public JLabel[] getGoodsLabs() {
        if (goodsLabs == null) {
            goodsLabs = new JLabel[12];
            for (int i = 0; i < goodsLabs.length; i++) {
                goodsLabs[i] = new JLabel();
                String style = MyIsif.getStyle();
                if ("水墨UI".equals(style)) {
                    goodsLabs[i].setBounds(26 + 20 + i % 6 * 51, 327 - 12 + i / 6 * 51, 50, 50);
                } else {
                    goodsLabs[i].setBounds(26 + i % 6 * 51, 327 + i / 6 * 51, 50, 50);
                }
                goodsLabs[i].addMouseListener(new MouseListenerSummonEquipMain(i, this));
                this.add(goodsLabs[i]);
            }
        }
        return goodsLabs;
    }

    public void setGoodsLabs(JLabel[] goodsLabs) {
        this.goodsLabs = goodsLabs;
    }

    public BtnSummonEquipMain getAckBtn() {
        if (ackBtn == null) {
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                ackBtn = new BtnSummonEquipMain("skin/8100226/newbutton/B20.png", 1, UIUtils.COLOR_WHITE2, UIUtils.TEXT_HY16,
                        "培养", 12, this);
                ackBtn.setBounds(144 + 20, 295 - 12, 59, 24);
            } else {
                // 
                ackBtn = new BtnSummonEquipMain("inkImg/hongmu/6026.png", 1, UIUtils.COLOR_BTNPUTONG, UIUtils.TEXT_HY88,
                        "", 12, this);
                ackBtn.setBounds(144, 295, 60, 26);
            }
            this.add(ackBtn);
        }
        return ackBtn;
    }

    public void setAckBtn(BtnSummonEquipMain ackBtn) {
        this.ackBtn = ackBtn;
    }

    public BtnSummonEquipMain getCashRewardsBtn() {
        if (cashRewardsBtn == null) {
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                cashRewardsBtn = new BtnSummonEquipMain("skin/8100226/button/49.png", 1, UIUtils.COLOR_BTNTEXT,
                        UIUtils.TEXT_FONT, "兑换奖励", 13, this);
                cashRewardsBtn.setBounds(23 + 20, 433 - 12, 68, 17);
            } else {
                cashRewardsBtn = new BtnSummonEquipMain("img/xy2uiimg/文字按钮_兑换奖励_w68,h51.png", 1, UIUtils.COLOR_BTNTEXT,
                        UIUtils.TEXT_FONT, "", 13, this);
                cashRewardsBtn.setBounds(23, 433, 68, 17);
            }
            this.add(cashRewardsBtn);
        }
        return cashRewardsBtn;
    }

    public void setCashRewardsBtn(BtnSummonEquipMain cashRewardsBtn) {
        this.cashRewardsBtn = cashRewardsBtn;
    }

    public JpanelNowEquip getJpanelNowEquip() {
        if (jpanelNowEquip == null) {
            jpanelNowEquip = new JpanelNowEquip(this);
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                jpanelNowEquip.setBounds(10 + 20, 140 - 12, 330, 150);
            } else {
                jpanelNowEquip.setBounds(10, 140, 330, 150);
            }
            this.add(jpanelNowEquip);
        }
        return jpanelNowEquip;
    }

    public void setJpanelNowEquip(JpanelNowEquip jpanelNowEquip) {
        this.jpanelNowEquip = jpanelNowEquip;
    }

    public JList<String> getSummonNameJlist() {
        if (summonNameJlist == null) {
            summonNameJlist = new JList<String>();//

            summonNameJlist.setSelectionBackground(new Color(33, 42, 52));
            Color fontcolor = Color.GREEN;
            summonNameJlist.setSelectionForeground(fontcolor);
            summonNameJlist.setForeground(fontcolor);
            summonNameJlist.setFont(new Font("微软雅黑", 0, 14));
            summonNameJlist.setBackground(UIUtils.Color_BACK); // 设置列表框为透明背景
            summonNameJlist.setOpaque(false);
            summonNameJlist.setModel(getSummonNamesModel());
            summonNameJlist.addMouseListener(new MouseAdapter() {

                @Override
                public void mousePressed(MouseEvent e) {
                    int selectedIndex = summonNameJlist.getSelectedIndex();
                    if (selectedIndex != -1) {
                        jpanelNowEquip.getSummonEquipList().clear();
                        if (selectedIndex == 0) {
                            for (int i = 0; i < summonList.size(); i++) {
                                String[] v = getSummonOne(summonList.get(i)).getStye().split("\\|");
                                getSummonEquips(v);
                            }
                        } else {
                            String[] v = getSummonOne(summonList.get(selectedIndex - 1)).getStye().split("\\|");
                            getSummonEquips(v);
                        }
                        scrollPane.setVisible(false);
                    }
                    jpanelNowEquip.getShowName().setText(summonNameJlist.getSelectedValue());
                    jpanelNowEquip.setNowPage(1);
                }

            });
        }
        return summonNameJlist;
    }

    public void setSummonNameJlist(JList<String> summonNameJlist) {
        this.summonNameJlist = summonNameJlist;
    }

    public DefaultListModel<String> getSummonNamesModel() {
        if (summonNamesModel == null) {
            summonNamesModel = new DefaultListModel<String>();
        }
        return summonNamesModel;
    }

    public void setSummonNamesModel(DefaultListModel<String> summonNamesModel) {
        this.summonNamesModel = summonNamesModel;
    }

    public JScrollPane getScrollPane() {
        String style = MyIsif.getStyle();
        if ("水墨UI".equals(style)) {
            if (scrollPane == null) {
                scrollPane = new JScrollPane(getSummonNameJlist()) {
                    private ImageIcon iconBack = new ImageIcon("inkImg/old/background/S132.png");

                    {
                        setOpaque(false);
                    }

                    @Override
                    public void paint(Graphics g) {
                        // 背景图片
                        g.drawImage(iconBack.getImage(), -2, 0, this);
                        super.paint(g);
                    }
                };
                scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
                scrollPane.getVerticalScrollBar().setUI(new SrcollPanelUI());
                scrollPane.getVerticalScrollBar().setUnitIncrement(30);
                scrollPane.getViewport().setOpaque(false);
                scrollPane.setOpaque(false);
                scrollPane.setBounds(22 + 20, 280 - 12, 148, 120);
                scrollPane.setBorder(BorderFactory.createEmptyBorder());
                scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
                this.add(scrollPane);
            }
        } else {
            // 
            if (scrollPane == null) {
                scrollPane = new JScrollPane(getSummonNameJlist()) {
                    private ImageIcon iconBack = new ImageIcon("img/xy2uiimg/已穿装备_底板_下拉框w147,h120.png");

                    {
                        setOpaque(false);
                    }

                    @Override
                    public void paint(Graphics g) {
                        // 背景图片
                        g.drawImage(iconBack.getImage(), 0, 0, this);
                        super.paint(g);
                    }
                };
                scrollPane.setVerticalScrollBarPolicy(22);
                scrollPane.getVerticalScrollBar().setUI(new TraslationDemoScrollBarUI(this.scrollPane));
                scrollPane.getVerticalScrollBar().setUnitIncrement(30);
                scrollPane.getViewport().setOpaque(false);
                scrollPane.setOpaque(false);
                scrollPane.setBounds(22, 280, 143, 120);
                scrollPane.setBorder(BorderFactory.createEmptyBorder());
                scrollPane.setHorizontalScrollBarPolicy(31);
                this.add(scrollPane);
            }
        }
        return scrollPane;
    }

    public void setScrollPane(JScrollPane scrollPane) {
        this.scrollPane = scrollPane;
    }

    public BtnSummonEquipMain getCultivateMenuBtn() {
        if (cultivateMenuBtn == null) {
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                cultivateMenuBtn = new BtnSummonEquipMain("skin/8100226/button/B218.png", 1, "", 1, this);
                cultivateMenuBtn.setBounds(54, 28, 63, 26);
            } else {
                cultivateMenuBtn = new BtnSummonEquipMain("img/xy2uiimg/小选项卡_培养_选中_w63,h78.png", 1, "", 1, this);
                cultivateMenuBtn.setBounds(30, 40, 63, 26);
            }
            this.add(cultivateMenuBtn);
        }
        return cultivateMenuBtn;
    }

    public void setCultivateMenuBtn(BtnSummonEquipMain cultivateMenuBtn) {
        this.cultivateMenuBtn = cultivateMenuBtn;
    }

    public BtnSummonEquipMain getRecastMenuBtn() {
        if (recastMenuBtn == null) {
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                recastMenuBtn = new BtnSummonEquipMain("skin/8100226/button/B199.png", 1, "", 2, this);
                recastMenuBtn.setBounds(54 + 65, 28, 63, 26);
            } else {
                recastMenuBtn = new BtnSummonEquipMain("img/xy2uiimg/小选项卡_重铸_未选中_w63,h78.png", 1, "", 2, this);
                recastMenuBtn.setBounds(95, 40, 63, 26);
            }
            this.add(recastMenuBtn);
        }
        return recastMenuBtn;
    }

    public void setRecastMenuBtn(BtnSummonEquipMain recastMenuBtn) {
        this.recastMenuBtn = recastMenuBtn;
    }

    public BtnSummonEquipMain getAwakenMenuBtn() {
        if (awakenMenuBtn == null) {
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                awakenMenuBtn = new BtnSummonEquipMain("skin/8100226/button/B215.png", 1, "", 3, this);
                awakenMenuBtn.setBounds(54 + 65 * 2, 28, 63, 26);
            } else {
                awakenMenuBtn = new BtnSummonEquipMain("img/xy2uiimg/小选项卡_觉醒_未选中_w63,h78.png", 1, "", 3, this);
                awakenMenuBtn.setBounds(160, 40, 63, 26);
            }
            this.add(awakenMenuBtn);
        }
        return awakenMenuBtn;
    }

    public void setAwakenMenuBtn(BtnSummonEquipMain awakenMenuBtn) {
        this.awakenMenuBtn = awakenMenuBtn;
    }

    public BtnSummonEquipMain getMaxNumBtn() {
        if (maxNumBtn == null) {
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                maxNumBtn = new BtnSummonEquipMain("skin/8100226/button/2.png", 1, UIUtils.COLOR_BTNTEXT, UIUtils.TEXT_FONT,
                        "最大", 14, this);
                maxNumBtn.setBounds(230 + 20, 206 - 12, 34, 17);
            } else {
                maxNumBtn = new BtnSummonEquipMain("img/xy2uiimg/文字按钮_最大_w34,h51.png", 1, UIUtils.COLOR_BTNTEXT, UIUtils.TEXT_FONT,
                        "最大", 14, this);
                maxNumBtn.setBounds(230, 206, 34, 17);
            }
            maxNumBtn.setVisible(false);
            this.add(maxNumBtn);
        }
        return maxNumBtn;
    }

    public void setMaxNumBtn(BtnSummonEquipMain maxNumBtn) {
        this.maxNumBtn = maxNumBtn;
    }

    public JLabel getUpgradeLab() {
        if (upgradeLab == null) {
            // upgradeLab = new JLabel("请先放入已有觉醒技的装备", JLabel.CENTER);
            upgradeLab = new JLabel("觉醒技:大圣附体\r\n等级:19\r\n经验:1501/4800", SwingConstants.CENTER);
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                upgradeLab.setBounds(132 + 20, 122 - 12, 159, 50);
            } else {
                upgradeLab.setBounds(132, 122, 159, 50);
            }
            upgradeLab.setFont(UIUtils.TEXT_FONT);
            upgradeLab.setForeground(Color.gray);
            upgradeLab.setVisible(false);
            this.add(upgradeLab);
        }
        return upgradeLab;
    }

    public void setUpgradeLab(JLabel upgradeLab) {
        this.upgradeLab = upgradeLab;
    }

    public JLabel getNowNumLab() {
        if (nowNumLab == null) {
            nowNumLab = new JLabel("<html><body>(拥有:<font color=#FFFF00>" + 0 + "</font>)</body><html>");
            // nowNumLab = new JLabel("(拥有:666)");
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                nowNumLab.setBounds(140 + 20, 227 - 12, 160, 17);
            } else {
                nowNumLab.setBounds(140, 227, 160, 17);
            }
            nowNumLab.setFont(UIUtils.TEXT_FONT);
            nowNumLab.setForeground(Color.white);
            nowNumLab.setVisible(false);
            this.add(nowNumLab);
        }
        return nowNumLab;
    }

    public void setNowNumLab(JLabel nowNumLab) {
        this.nowNumLab = nowNumLab;
    }

    public JLabel[] getWashGoodsLabs() {
        if (washGoodsLabs == null) {
            washGoodsLabs = new JLabel[5];
            class MListener extends MouseAdapter {
                private int i;

                public MListener(int i) {
                    this.i = i;
                }

                @Override
                public void mousePressed(MouseEvent e) {
                    if (e.getButton() == MouseEvent.BUTTON3) {
                        recoverWashGoodsLabs(i);
                    }
                }

                @Override
                public void mouseEntered(MouseEvent e) {
                    Goodstable goodstable = chooseWashGoods[i];
                    if (goodstable != null) {
                        ZhuFrame.getZhuJpanel().creatgoodtext(goodstable);
                    }
                }

                @Override
                public void mouseExited(MouseEvent e) {
                    TestpackJframe.getTestpackJframe().getJpac().ClearText();
                    ZhuFrame.getZhuJpanel().cleargoodtext();
                }
            }
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                for (int i = 0; i < washGoodsLabs.length; i++) {
                    washGoodsLabs[i] = new JLabel("", SwingConstants.CENTER);
                    washGoodsLabs[i].setBounds(56 + 20 + i * 49, 192 - 12, 39, 39);
                    if (i == 0) {
                        washGoodsLabs[i].setText("晶石");
                    } else if (i == 1) {
                        washGoodsLabs[i].setText("精华");
                    } else {
                        washGoodsLabs[i].setText("九彩");
                    }
                    washGoodsLabs[i].setFont(UIUtils.TEXT_FONT);
                    washGoodsLabs[i].setForeground(Color.gray);
                    washGoodsLabs[i].setVisible(false);
                    washGoodsLabs[i].addMouseListener(new MListener(i));
                    this.add(washGoodsLabs[i]);
                }
            } else {
                // 
                for (int i = 0; i < washGoodsLabs.length; i++) {
                    washGoodsLabs[i] = new JLabel("", SwingConstants.CENTER);
                    washGoodsLabs[i].setBounds(56 + i * 49, 192, 39, 39);
                    if (i == 0) {
                        washGoodsLabs[i].setText("晶石");
                    } else if (i == 1) {
                        washGoodsLabs[i].setText("精华");
                    } else {
                        washGoodsLabs[i].setText("九彩");
                    }
                    washGoodsLabs[i].setFont(UIUtils.TEXT_FONT);
                    washGoodsLabs[i].setForeground(Color.gray);
                    washGoodsLabs[i].setVisible(false);
                    washGoodsLabs[i].addMouseListener(new MListener(i));
                    this.add(washGoodsLabs[i]);
                }
            }
        }
        return washGoodsLabs;
    }

    public void setWashGoodsLabs(JLabel[] washGoodsLabs) {
        this.washGoodsLabs = washGoodsLabs;
    }

//    public BtnSummonEquipMain getHelpBtn() {
//        if (helpBtn == null) {
//        	if(MyIsif.getStyle().equals("水墨UI")) {
//        		helpBtn = new BtnSummonEquipMain("skin/8100226/button/19.png", 1, UIUtils.COLOR_BTNTEXT, UIUtils.TEXT_FONT, "?",
//                        15, this);
//                helpBtn.setBounds(311 + 20, 70 - 12, 18, 18);
//        	}else {
//        		helpBtn = new BtnSummonEquipMain("inkImg/hongmu/lottery/？w17,h51px.png", 1, UIUtils.COLOR_BTNTEXT, UIUtils.TEXT_FONT, "?",
//        				15, this);
//        		helpBtn.setBounds(311, 70, 17, 17);
//        	}
//            this.add(helpBtn);
//        }
//        return helpBtn;
//    }

//    public void setHelpBtn(BtnSummonEquipMain helpBtn) {
//        this.helpBtn = helpBtn;
//    }

    public BigDecimal getChooseEquip() {
        return chooseEquip;
    }

    public void setChooseEquip(BigDecimal chooseEquip) {
        this.chooseEquip = chooseEquip;
    }

    public BigDecimal getChooseGoods() {
        return chooseGoods;
    }

    public void setChooseGoods(BigDecimal chooseGoods) {
        this.chooseGoods = chooseGoods;
    }

    public Goodstable[] getChooseWashGoods() {
        if (chooseWashGoods == null) {
            chooseWashGoods = new Goodstable[5];
        }
        return chooseWashGoods;
    }

    public void setChooseWashGoods(Goodstable[] chooseWashGoods) {
        this.chooseWashGoods = chooseWashGoods;
    }

    public JTextField getNumText() {
        if (numText == null) {
            numText = new JTextField();
            numText.setForeground(Color.white);
            numText.setFont(UIUtils.TEXT_FONT1);
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                numText.setBounds(144 + 20, 207 - 12, 87, 16);
            } else {
                numText.setBounds(144, 207, 87, 16);
            }
            numText.setOpaque(false);
            numText.setCaretColor(Color.white);
            numText.setBorder(null);
            numText.setVisible(false);
            this.add(numText);
            numText.getDocument().addDocumentListener(new DocumentListener() {
                BigDecimal gold = new BigDecimal(6000);

                @Override
                public void removeUpdate(DocumentEvent e) {
                    String s = numText.getText();
                    try {
                        money = gold.multiply(new BigDecimal(s));
                    } catch (NumberFormatException e1) {
                    }
                }

                @Override
                public void insertUpdate(DocumentEvent e) {
                    String s = numText.getText();
                    try {
                        money = gold.multiply(new BigDecimal(s));
                    } catch (NumberFormatException e1) {
                    }

                }

                @Override
                public void changedUpdate(DocumentEvent e) {
                }
            });
            numText.addKeyListener(new KeyListener() {
                boolean type = true;

                @Override
                public void keyTyped(KeyEvent e) {
                    int charstr = e.getKeyChar();
                    String str = numText.getText();
                    if (str.length() == 0) {
                        numText.setText(0 + "");
                    }

                    // control the value between 0 and 9
                    if (charstr < KeyEvent.VK_0 || charstr > KeyEvent.VK_9) {
                        e.consume();
                    }
                    if (str.length() == 1) {
                        if ("0".equals(str)) {
                            numText.setText("");
                        }
                    }
                    if (str.length() > 0) {
                        if (scoretype.compareTo(new BigDecimal(str)) <= 0) {
                            type = false;
                            e.consume();
                            numText.setText(scoretype.toString());
                        } else {
                            type = true;
                        }
                    }

                }

                @Override
                public void keyPressed(KeyEvent e) {

                }

                @Override
                public void keyReleased(KeyEvent e) {
                    if (type) {
                        String str = numText.getText();
                        if (scoretype.compareTo(new BigDecimal(str)) <= 0) {
                            e.consume();
                            numText.setText(scoretype.toString());
                        }
                    }
                }
            });
        }
        return numText;
    }

    public void setNumText(JTextField numText) {
        this.numText = numText;
    }

    public JLabel getAwakenName() {
        if (awakenName == null) {
            awakenName = new JLabel("觉醒技:  大圣附体");
            awakenName.setForeground(Color.white);
            awakenName.setFont(UIUtils.TEXT_FONT);
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                awakenName.setBounds(132 + 8 + 20, 121 - 12, 159 - 8, 16);
            } else {
                awakenName.setBounds(140, 121, 151, 16);
            }
            awakenName.setVisible(false);
            this.add(awakenName);
        }
        return awakenName;
    }

    public void setAwakenName(JLabel awakenName) {
        this.awakenName = awakenName;
    }

    public JLabel getLevelLab() {
        if (levelLab == null) {
            levelLab = new JLabel("等  级:  19");
            levelLab.setForeground(Color.white);
            levelLab.setFont(UIUtils.TEXT_FONT);
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                levelLab.setBounds(132 + 8 + 20, 121 + 16 - 12, 159 - 8, 16);
            } else {
                levelLab.setBounds(140, 137, 151, 16);
            }
            levelLab.setVisible(false);
            this.add(levelLab);
        }
        return levelLab;
    }

    public void setLevelLab(JLabel levelLab) {
        this.levelLab = levelLab;
    }

    public JLabel getExpLab() {
        if (expLab == null) {
            expLab = new JLabel("经  验:  1501/4800");
            expLab.setForeground(Color.white);
            expLab.setFont(UIUtils.TEXT_FONT);
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                expLab.setBounds(132 + 8 + 20, 121 - 12 + 16 * 2, 159 - 8, 16);
            } else {
                expLab.setBounds(140, 153, 151, 16);
            }
            expLab.setVisible(false);
            this.add(expLab);
        }
        return expLab;
    }

    public void setExpLab(JLabel expLab) {
        this.expLab = expLab;
    }

    public JLabel getExpLabImg() {
        if (expLabImg == null) {
            expLabImg = new JLabel();
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                expLabImg.setBounds(135 + 49 + 20, 126 - 12 + 16 * 2, 159 - 49, 8);
                expLabImg.setIcon(CutButtonImage.getImage("skin/8100226/button/26.png", 102, 8));
            } else {
                expLabImg.setBounds(184, 158, 110, 8);
                expLabImg.setIcon(CutButtonImage.getImage("img/xy2uiimg/经验_条_102,h8.png", 102, 8));
            }
            expLabImg.setVisible(false);
            this.add(expLabImg);
        }
        return expLabImg;
    }

    public void setExpLabImg(JLabel expLabImg) {
        this.expLabImg = expLabImg;
    }

    public JLabel getExpBackLabImg() {
        if (expBackLabImg == null) {
            expBackLabImg = new JLabel();
            String style = MyIsif.getStyle();
            if ("水墨UI".equals(style)) {
                expBackLabImg.setBounds(132 + 49 + 20, 122 - 13 + 16 * 2, 159 - 49, 18);
                expBackLabImg.setIcon(CutButtonImage.getImage("inkImg/old/background/S134.png", 110, 19));
            } else {
                expBackLabImg.setBounds(181, 154, 110, 18);
                expBackLabImg.setIcon(CutButtonImage.getImage("img/xy2uiimg/经验_外框_110,h18.png", 110, 19));
            }
            expBackLabImg.setVisible(false);
            this.add(expBackLabImg);
        }
        return expBackLabImg;
    }

    public void setExpBackLabImg(JLabel expBackLabImg) {
        this.expBackLabImg = expBackLabImg;
    }

    public ArrayList<BigDecimal> getSummonList() {
        if (summonList == null) {
            summonList = new ArrayList<>();
        }
        return summonList;
    }

    public void setSummonList(ArrayList<BigDecimal> summonList) {
        this.summonList = summonList;
    }

    public BigDecimal getScoretype() {
        return scoretype;
    }

    public void setScoretype(BigDecimal scoretype) {
        this.scoretype = scoretype;
    }

}
